import Toast2 from './Toast2.vue'
import Vue from 'vue'

const obj2 = {
    install() {

    //1.创建组件构造器
    const obj2Counstrctor = Vue.extend(Toast2);

    //2.实例化组件对象
    const toast2 = new obj2Counstrctor();

    //3.将组件挂载到某个元素
    toast2.$mount(document.createElement('div'))

    //4.将元素写入DOM
    document.body.appendChild(toast2.$el)

    //5.vue原型添加组件对象
    Vue.prototype.$toast2 = toast2
    }
}

// obj2.install = function() {


// }

export default obj2